<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!--第1步引入vue.js文件--> 
    <script src="../vue.js"></script>
</head>
<body>
    <!--第2步：在body中定义一个div层-->
    <div id="app">
        <table>
            <tr>
                <td>序号</td>
                <td>学号</td>
                <td>姓名</td>
                <td>性别</td>
                <td>生日</td>
            </tr>
            <tr v-for="(student,index) in userList">
                <td>{{index+1}}</td>
                <td>{{student.studentNo}}</td>
                <td>{{student.studentName}}</td>
                <td>{{student.sex}}</td>
                <td>{{student.birthday}}</td>
            </tr>
        </table>
    </div>
   
</body>
</html>
<script>
    //第3步：创建vue实例
    var vm=new Vue({ 
        el:'#app', //选择器
        data:{
            userList:[
                {studentNo:'1001',studentName:'陈诗桐',sex:"男",birthday:'1990-09-09'},
                {studentNo:'1002',studentName:'熊静',sex:"女",birthday:'1990-09-01'},
                {studentNo:'1003',studentName:'黄金涛',sex:"男",birthday:'1990-09-02'}
            ]
        }
    });
</script> 